<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/test/new_overtime/new_overtime.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/test/new_overtime/new_overtime.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'new_overtime_id',
                footer: "Foots",
                cnName: '测试加班申请',
                name: 'new_overtime/new_overtime',
                url: "/new_overtime/",
                sortName: "CreateDate"
            });
            const editFormFields = ref({"new_depart":"","new_reason":""});
            const editFormOptions = ref([[{"title":"部门名称","field":"new_depart"}],
                              [{"title":"申请缘由","field":"new_reason"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:'CreateID',title:'CreateID',type:'string',width:100,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人',type:'string',width:100,readonly:true,align:'left',sort:true},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,readonly:true,align:'left',sort:true},
                       {field:'ModifyID',title:'ModifyID',type:'string',width:100,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人',type:'string',width:100,readonly:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,readonly:true,align:'left',sort:true},
                       {field:'new_depart',title:'部门名称',type:'string',width:120,align:'left'},
                       {field:'new_reason',title:'申请缘由',type:'string',width:120,align:'left'},
                       {field:'AuditStatus',title:'审批状态',type:'int',width:120,readonly:true,align:'left'},
                       {field:'AuditDate',title:'审批时间',type:'datetime',width:150,readonly:true,align:'left',sort:true},
                       {field:'AuditId',title:'AuditId',type:'string',width:120,align:'left'},
                       {field:'Auditor',title:'审批人',type:'string',width:120,readonly:true,align:'left'},
                       {field:'new_name',title:'编号',type:'string',link:true,width:120,readonly:true,align:'left'},
                       {field:'new_overtime_id',title:'new_overtime_id',type:'guid',width:110,hidden:true,require:true,align:'left'}]);
            const detail = ref({
                cnName: "测试加班申请明细",
                table: "new_overtimeline",
                columns: [{field:'new_overtime_name',title:'加班申请编号（废弃）',type:'string',width:120,hidden:true,align:'left'},
                       {field:'CreateID',title:'CreateID',type:'string',width:100,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人',type:'string',width:100,readonly:true,align:'left',sort:true},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,readonly:true,align:'left',sort:true},
                       {field:'ModifyID',title:'ModifyID',type:'string',width:100,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人',type:'string',width:100,readonly:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,readonly:true,align:'left',sort:true},
                       {field:'new_name',title:'编号',type:'string',width:120,align:'left'},
                       {field:'new_starttime',title:'开始时间',type:'datetime',width:150,edit:{type:'datetime'},align:'left',sort:true},
                       {field:'new_endtime',title:'结束时间',type:'datetime',width:150,edit:{type:'datetime'},align:'left',sort:true},
                       {field:'new_overtime_id',title:'加班申请编号',type:'guid',bind:{ key:'加班申请单号',data:[]},width:120,edit:{type:'select'},align:'left'},
                       {field:'new_applyname',title:'申请人',type:'string',width:120,edit:{type:''},align:'left'},
                       {field:'new_overtimeline_id',title:'new_overtimeline_id',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'code',title:'code',type:'string',width:120,hidden:true,align:'left'}],
                sortName: "CreateDate",
                key: "new_overtimeline_id"
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
